﻿using System;

class NumbersOneToThousand
{
    static void Main()
    {
        Console.WriteLine("Input a number between 1 and 1000:");
        int number = int.Parse(Console.ReadLine());
        if (number > 0 && number < 20)
        {
            PrintNumberFromOneToNineteen(number);
        }
        else if (number >= 20 && number < 100)
        {
            PrintNumberFromTwentyToHundred((number / 10) * 10);
            PrintNumberFromOneToNineteen(number % 10);
        }
        else if (number >= 100 && number < 1000)
        {
            PrintNumberFromOneToNineteen(number / 100);
            Console.Write("hundred ");
            PrintNumberFromTwentyToHundred(((number % 100) / 10) * 10);
            PrintNumberFromOneToNineteen(number % 10);
        }
        else if (number == 1000)
        {
            Console.Write("one thousand ");
        }
        else
        {
            Console.WriteLine("Wrong input");
        }
        Console.WriteLine();
    }

    static void PrintNumberFromOneToNineteen(int number)
    {
        switch (number)
        {
            case 1:
                Console.Write("one ");
                break;
            case 2:
                Console.Write("two ");
                break;
            case 3:
                Console.Write("three ");
                break;
            case 4:
                Console.Write("four ");
                break;
            case 5:
                Console.Write("five ");
                break;
            case 6:
                Console.Write("six ");
                break;
            case 7:
                Console.Write("seven ");
                break;
            case 8:
                Console.Write("eight ");
                break;
            case 9:
                Console.Write("nine ");
                break;
            case 10:
                Console.Write("ten ");
                break;
            case 11:
                Console.Write("eleven");
                break;
            case 12:
                Console.Write("twelve");
                break;
            case 13:
                Console.Write("thirteen");
                break;
            case 14:
                Console.Write("fourteen");
                break;
            case 15:
                Console.WriteLine("fifteen");
                break;
            case 16:
                Console.WriteLine("sixteen");
                break;
            case 17:
                Console.WriteLine("seventeen");
                break;
            case 18:
                Console.WriteLine("eighteen");
                break;
            case 19:
                Console.WriteLine("nineteen");
                break;
        }
    }

    static void PrintNumberFromTwentyToHundred(int number)
    {
        switch (number)
        {
            case 20:
                Console.Write("twenty ");
                break;
            case 30:
                Console.Write("thirty ");
                break;
            case 40:
                Console.Write("forty ");
                break;
            case 50:
                Console.Write("fifty ");
                break;
            case 60:
                Console.Write("sixty ");
                break;
            case 70:
                Console.Write("seventy ");
                break;
            case 80:
                Console.Write("eighty ");
                break;
            case 90:
                Console.Write("ninety ");
                break;
        }
    }
}